package com.shyroke.daydayzhuandao.respository;

import com.shyroke.daydayzhuanapi.entity.ProjectLabelEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProjectLabelRepository extends BaseRepository<ProjectLabelEntity,Integer>{
    List<ProjectLabelEntity> findByLabelid(Integer labelId);

    @Query(nativeQuery = true,value = "  select count(0) from project_label where labelid = ?1 limit 40 ")
    Integer getCountByLabelid(Integer id);

    List<ProjectLabelEntity> findByProjectid(Integer projectId);
}
